Fix VPC network offerings listing in isolated network creation form#12645
Fix VPC network offerings listing in isolated network creation form#12645erikbocks wants to merge 1 commit intoapache:4.20from
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 4.20 #12645 +/- ##
============================================
- Coverage 16.26% 16.26% -0.01%
Complexity 13433 13433
============================================
Files 5665 5665
Lines 500530 500530
Branches 60787 60787
============================================
- Hits 81411 81410 -1
- Misses 410027 410028 +1
Partials 9092 9092
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@blueorangutan package |
|
@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✖️ debian ✔️ suse15. SL-JID 16842 |
|
@erikbocks as this is a simple enhancement, could you target the next 4.20/4.22 minor? |
|
@DaanHoogland a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
3075a64 to
d1cda46
Compare
|
@DaanHoogland a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
|
UI build: ✔️ |
| this.fetchNetworkOfferingData(true) | ||
| } else { // from guest network section | ||
| var params = {} | ||
| var params = { |
There was a problem hiding this comment.
| var params = { | |
| const params = { |
| var vpcAvailable = this.arrayHasItems(listVPCs) | ||
| if (vpcAvailable === false) { | ||
| this.hasVPC = this.arrayHasItems(listVPCs) | ||
| if (this.hasVPC === false) { |
There was a problem hiding this comment.
| if (this.hasVPC === false) { | |
| if (!this.hasVPC) { |
| "message.warn.filetype": "jpg, jpeg, png, bmp and svg are the only supported image formats.", | ||
| "message.warn.importing.instance.without.nic": "WARNING: This Instance is being imported without NICs and many Network resources will not be available. Consider creating a NIC via vCenter before importing or as soon as the Instance is imported.", | ||
| "message.warn.zone.mtu.update": "Please note that this limit won't affect pre-existing Network's MTU settings", | ||
| "message.warn.vpc.offerings": "VPC offerings will be shown only if the selected account has at least one VPC.", |
There was a problem hiding this comment.
| "message.warn.vpc.offerings": "VPC offerings will be shown only if the selected account has at least one VPC.", | |
| "message.warn.vpc.offerings": "VPC offerings will only be shown if the selected account has at least one VPC.", |
| "message.vr.alert.upon.network.offering.creation.others": "Como nenhum dos servi\u00e7os obrigat\u00f3rios para cria\u00e7\u00e3o do VR (VPN, DHCP, DNS, Firewall, LB, UserData, SourceNat, StaticNat, PortForwarding) foram habilitados, o VR n\u00e3o ser\u00e1 criado e a oferta de computa\u00e7\u00e3o n\u00e3o ser\u00e1 usada.", | ||
| "message.warn.filetype": "jpg, jpeg, png, bmp e svg s\u00e3o os \u00fanicos formatos de imagem suportados", | ||
| "message.warn.importing.instance.without.nic": "AVISO: essa inst\u00e2ncia est\u00e1 sendo importada sem NICs e muitos recursos de rede n\u00e3o estar\u00e3o dispon\u00edveis. Considere criar uma NIC antes de importar via VCenter ou assim que a inst\u00e2ncia for importada.", | ||
| "message.warn.vpc.offerings": "Ofertas de VPC s\u00c3o exibidas somente caso a conta selecionada possua ao menos uma VPC.", |
There was a problem hiding this comment.
| "message.warn.vpc.offerings": "Ofertas de VPC s\u00c3o exibidas somente caso a conta selecionada possua ao menos uma VPC.", | |
| "message.warn.vpc.offerings": "Ofertas de VPC somente ser\u00c3o exibidas caso a conta selecionada possua ao menos uma VPC.", |
| if (this.hasVPC === false) { | ||
| this.fetchNetworkOfferingData(false) | ||
| } else { | ||
| this.fetchNetworkOfferingData() |
There was a problem hiding this comment.
| if (this.hasVPC === false) { | |
| this.fetchNetworkOfferingData(false) | |
| } else { | |
| this.fetchNetworkOfferingData() | |
| this.fetchNetworkOfferingData(this.hasVPC) |
There was a problem hiding this comment.
@erikbocks I did not dig in this code too deep, if these are not equivalente, you can just disregard this suggestion
GaOrtiga
left a comment
There was a problem hiding this comment.
LGTM apart from some minor nits


Description
Currently, when creating a new isolated network, it is possible to assign it as a VPC tier. The VPC assignment field is shown only when a VPC network offering is selected. However, it was noticed that VPC network offerings are listed only if the current user has at least one VPC. Otherwise, VPC network offering were not listed and it was necessary to access another account that has a VPC or create a dummy VPC.
Changes were made,to list offerings based on the form selected account instead of the current user. Besides that, an warning was added below the network offerings field informing that VPC network offerings will be shown only if the selected account has at least one VPC.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Screenshots (if appropriate):
Warning message:
No VPC user offerings
No warning shown for account that has a VPC:
VPC network offerings listed for a account that has a VPC
How Has This Been Tested?
Logged in with the
adminaccount, I created a VPC to theradmaccount. Then, I accessed the isolated network creation form and validated that the VPC offerings were not shown (because the current account did not had a VPC). Then, I applied the PR changes to my local environment.With the changes applied, the isolated network form was accessed again, and it was possible to see the warning message. When the
radmwas selected in the form, the warning message was hidden and the VPC offerings were listed successfully.The same tests were reproduced for projects.